<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="IconLoader,flexlib.controls.IconLoader,source,scaleContent" name="keywords">
<title>flexlib.controls.IconLoader</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'IconLoader - flexlib';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?flexlib/controls/IconLoader.html&amp;flexlib/controls/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;IconLoader</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#styleSummary">Styles</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class IconLoader"); titleBar_setSubNav(false,true,true,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">flexlib.controls</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class IconLoader</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">IconLoader <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> mx.core.UIComponent</td>
</tr>
</table>
<p></p>
  The <code>IconLoader</code> component converts a Macintosh OS X (.icns) or Windows XP (.ico) icon
  file, along with its alpha mask, to a Flex 2 UIComponent. The interface is similar to that of 
  <code>mx:Image</code> in that the <code>source</code> property can be set to either an
  embedded icon or a URL that an asset can be loaded from.
  
  <p>The current implementations of the .ico and .icns parsers only support 32 bit icons. For .icns
  files, this means that the following types are supported, along with their associated masks:
  'is32', 'il32', 'ih32', and 'it32'. For .ico files, only "XP" style icons, where an 8-bit alpha
  mask is included in the image data, are supported.</p>
  
  <p>Example MXML usage:</p>
  
  <pre>
  &lt;IconLoader xmlns="flexlib.controls.&#42;"
    source="&#64;Embed( source='assets/app_icon.icns', mime-type='application/octet-stream' )"
    scaleContent="true"&gt;
  </pre>
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#scaleContent">scaleContent</a> : Boolean<div class="summaryTableDescription">
   Enables or disables scaling of the icon content to fit this control's bounds.</div>
</td><td class="summaryTableOwnerCol">IconLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#source">source</a> : Object<div class="summaryTableDescription">
   Sets the location of the icon data.</div>
</td><td class="summaryTableOwnerCol">IconLoader</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#IconLoader()">IconLoader</a>()</div>
<div class="summaryTableDescription">
   Constructor
   </div>
</td><td class="summaryTableOwnerCol">IconLoader</td>
</tr>
</table>
</div>
<a name="styleSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Styles</div>
<table id="summaryTableStyle" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Style</th><th>Description</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol"><a name="style:brokenImageBorderSkin"></a>&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<span class="signatureLink">brokenImageBorderSkin</span>
</div>
</td><td class="summaryTableDescription"><span class="label">Type: </span>Class &nbsp; <span class="label">CSS Inheritance: </span>no<br>
  Skin used to display border around "broken link" image
   The default value is <code>BrokenImageBorderSkin</code>.</td><td class="summaryTableOwnerCol">IconLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol"><a name="style:brokenImageSkin"></a>&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<span class="signatureLink">brokenImageSkin</span>
</div>
</td><td class="summaryTableDescription"><span class="label">Type: </span>Class &nbsp; <span class="label">CSS Inheritance: </span>no<br>
  Skin displayed when a URL cannot be loaded
   The default value is <code>BrokenImageSkin</code>.</td><td class="summaryTableOwnerCol">IconLoader</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="scaleContent"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">scaleContent</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var scaleContent:Boolean</code><p>
   Enables or disables scaling of the icon content to fit this control's bounds.
   
   </p><p>When this property is set to <code>true</code>, the icon's image will be scaled
   to fill the bounds of this control. When calculating the scale ratio, the lesser
   of the bouding width and height is used.</p>
   
   <p>If this property is set to <code>false</code> an icon is chosen from those 
   contained in the source file based on the size of this control.</p>
   
   <p>Icon files typically contain icons at multiple sizes. When choosing which icon
   to display, this control considers the value of the <code>scaleContents</code>
   propety. If <code>scaleContents</code> is <code>false</code>, the largest icon that 
   does not exceed the control's bounds is chosen. When the value is <code>true</code>,
   the icon chosen is the smallest icon that exceeds this control's bounds.</p>
   
   <p>The default value is <code>false</code>.</p>
<p>This property can be used as the source for data binding.</p>
</div>
<a name="source"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">source</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var source:Object</code><p>
   Sets the location of the icon data.
   
   </p><p>This property can be set to either a String or a class that extends ByteArray. In the case
   where the source is a String, it is treated as a URL from which an icon file can be
   retrieved. Setting <code>source</code> to a String initiates a process where the 
   image is retrieved from the URL. In the case of a ByteArray subclass, the class is
   immediately parsed and the display list is updated. The latter scenario is the
   result of using the &#64;Embed(...) compiler directive.</p>
   
   <p>Note that when using the &#64;Embed(...) directive, the <code>mime-type</code> property of
   the &#64;Embed directive must be set to <code>application/octet-stream</code></p>
   <p>This property can be used as the source for data binding.</p>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="IconLoader()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">IconLoader</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function IconLoader()</code><p>
   Constructor
   </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
